package cn.tannn.tcache.command;

import cn.tannn.tcache.core.Command;
import cn.tannn.tcache.core.Reply;
import cn.tannn.tcache.core.Tcache;

/**
 * info 命令
 * <p> info
 *
 * @author <a href="https://t.tannn.cn/">tnnn</a>
 * @version V1.0
 * @date 2024/6/19 下午8:15
 */
public class InfoCommand implements Command {

    public static final String INFO = "tcache Server[v1.0.0], created by tan." + CRLF
                                      + "Mock Redis Server, at 2024-06-12 in chongqing." + CRLF;

    @Override
    public String name() {
        return "INFO";
    }

    @Override
    public Reply<?> exec(Tcache cache, String[] args) {
        return Reply.bulkString(INFO);
    }
}
